feat: LangChain tools for Hotdata managed databases#1
Conversation
Bootstrap hotdata-langchain with SQL and managed database agent tools built on hotdata-runtime 0.1.1.
Require the latest SDK directly alongside hotdata-runtime for clearer version alignment.
| license = { text = "MIT" } | ||
| dependencies = [ | ||
| "hotdata-runtime>=0.1.1", | ||
| "hotdata>=0.2.0", |
There was a problem hiding this comment.
nit: hotdata>=0.2.0 is listed as a direct dependency, but nothing in this package imports hotdata directly — only hotdata_runtime and langchain_core. It's already pulled in transitively via hotdata-runtime, so this line can be dropped to keep the direct dependency set minimal. (not blocking)
Add scripts/release.sh for version bumps, changelog updates, tagging, and GitHub Release creation via CI. Enforce changelog checks on version PRs.
Run locked uv sync and pytest on pull requests. Validate examples/demo.ipynb structure and optional live smoke when HOTDATA_API_KEY is set.
| if text.startswith("# Changelog"): | ||
| parts = text.split("\n\n", 2) | ||
| if len(parts) >= 2: | ||
| text = parts[0] + "\n\n" + parts[1] + "\n\n" + insert + (parts[2] if len(parts) > 2 else "") |
There was a problem hiding this comment.
nit: this text.split("\n\n", 2) branch assumes the preamble between # Changelog and the first version heading is a single paragraph, but the Keep a Changelog template (which CHANGELOG.md here uses) has two paragraphs: the "All notable changes…" line and the "The format is based on…" line. When [Unreleased] actually contains notes, parts[1] only captures the first paragraph and the new ## [X.Y.Z] block gets spliced between the two preamble paragraphs, pushing "The format is based on…" below the new release.
The current PR isn't affected because [Unreleased] is empty (so the else branch on line 142 runs), but the next release with notes will produce a malformed changelog. Easiest fix is to anchor on ## [Unreleased] directly, e.g.
text = text.replace("## [Unreleased]", insert.rstrip() + "\n\n## [Unreleased]", 1)after building insert as f"## [{ver}] - {date}\n{body}" (without the leading ## [Unreleased]). That keeps both else and this branch on one consistent path. (not blocking)
Avoid duplicate [Unreleased] headings and keep the preamble intact when preparing releases. Add unit tests and harden release workflow output.
|
|
||
| jobs: | ||
| test: | ||
| name: Test (Python 3.12) |
There was a problem hiding this comment.
nit: pyproject.toml declares requires-python = ">=3.10", but CI only exercises Python 3.12. The code uses 3.10+ generic syntax (list[str] | None) under from __future__ import annotations, so it should work on 3.10/3.11, but nothing here verifies those versions stay green. Consider a strategy.matrix.python-version: ['3.10', '3.11', '3.12'] so a regression at the lower bounds is caught before users hit it. (not blocking)
Summary
hotdata-langchainwith agent tools built onhotdata-runtime>=0.1.1make_hotdata_tools()Tools
hotdata_execute_sqlhotdata_list_managed_databaseshotdata_create_managed_databasehotdata_load_managed_tableTest plan
uv sync --lockeduv run pytest(21 passed)